package com.example.service;

import com.example.entity.*;
import jakarta.servlet.http.HttpSession;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface ManagerService {
    void commit();
    void rollback();
    void clearCache();
    boolean auth(String m_account, String m_password, HttpSession session);
    Manager getManager(String m_account, String m_password);
//    int getPassengerCount();
//    int getFlightCount();
//    int getOrderCount();
    //订单
    int getOrderCountByDate(String date);
    int getCancelledAndRefundOrderNum();
    double getPaidOrderMoneyByDate(String startDate, String endDate);
    int getRefundOrderCount();
    int getRefundOrderNumByDate(String startDate, String endDate);
    int getOrderNum();
    int getUnpaidOrderNum();
    int getPaidOrderNum();
    int getCompletedOrderNum();
    int getCancelledOrderNum();
    List<Order> getOrderList();
    //航班
    int getFlightCountByDate(String date);
    int getDelayFlightNum(String date);
    int getCancelFlightNum(String date);
    int getFlightSpaceByDate(String date);
    List<FlightWithStatus> getFlightList();
    //报表
    BigDecimal getTotalMoney();
    BigDecimal getTotalMoneyByDate(String startDate, String endDate);
    int getTotalFlightNum();
    int getTotalDelayFlightNum();
    int getTotalFlightNumByDate(String startDate, String endDate);
    int getTotalUserNum();
    int getTotalUserNumByDate(String startDate, String endDate);
    List<CityCount> getTop6Cities();
    List<TopRoute> getTop5RoutesByDate(String startDate, String endDate);
    int getOrderCountByLongDate(String startDate, String endDate);
    int getEconomyOrderCountByLongDate(String startDate, String endDate);
    int getBusinessOrderCountByLongDate(String startDate, String endDate);
    int getFirstOrderCountByLongDate(String startDate, String endDate);
}
